﻿
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Script</title>
</head>
<body>
    <h2>Script tag helper test</h2>
    <script src="HtmlEncode[[/site.js]]" data-foo="foo-data1" title="&lt;the title>">
        // Regular script with comment in body, and extra properties.
    </script>

    <script data-foo="foo-data2" title="&lt;the title>" src="HtmlEncode[[/blank.js?a=b&c=d]]">
        // TagHelper script with comment in body, and extra properties.
    </script>
<script>(false||document.write("<script JavaScriptEncode[[data-foo]]=\"JavaScriptEncode[[foo-data2]]\" JavaScriptEncode[[title]]=\"JavaScriptEncode[[&lt;the title>]]\" src=\"JavaScriptEncode[[/site.js?a=b&c=d]]\"><\/script>"));</script>

    <script title="&quot;the&quot; title" src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src
    </script>
<script>(false||document.write("<script JavaScriptEncode[[title]]=\"JavaScriptEncode[["the" title]]\" src=\"JavaScriptEncode[[/site.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src with exclude
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js]]\"><\/script><script src=\"JavaScriptEncode[[/sub/site2.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed and static src
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js]]\"><\/script><script src=\"JavaScriptEncode[[/sub/site2.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed and static src should de-dupe
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src with missing include
    </script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to static and globbed src with missing include
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src outside of webroot
    </script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src outside of webroot
    </script>

    <script data-foo="foo-data3">
        // Valid TagHelper (although no src is provided) script with comment in body, and extra properties.
    </script>
<script>(false||document.write("<script JavaScriptEncode[[data-foo]]=\"JavaScriptEncode[[foo-data3]]\" src=\"JavaScriptEncode[[/site.js]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Invalid TagHelper script with comment in body.
    </script>

    <!-- Globbed script tag with existing file -->
    <script src="HtmlEncode[[/site.js]]"></script>

    <!-- Globbed script tag with existing file and exclude -->
    <script src="HtmlEncode[[/site.js]]"></script><script src="HtmlEncode[[/sub/site2.js]]"></script>

    <script>
        // Globbed script tag missing include
    </script>

    <script src="HtmlEncode[[/site.js]]">
        // Globbed script tag missing include but with static src
    </script>

    <!-- Globbed script tag with missing file -->
    

    <!-- Globbed script tag with file outside of webroot -->
    

    <!-- Globbed script tag with file outside of webroot -->
    

    <script src="HtmlEncode[[/site.js]]">
        // Globbed script tag with existing file and static src
    </script><script src="HtmlEncode[[/sub/site2.js]]"></script>

    <script src="HtmlEncode[[/site.js]]">
        // Globbed script tag with existing file and static src should dedupe
    </script>

    <script src="HtmlEncode[[/blank.js]]">
        // TagHelper script with comment in body, and file version.
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js?v=jx1PJjLX32-xgQQx2BxnckU9QH9DVKkm4-M5bSK869I]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/blank.js]]">
        // Fallback to globbed src with file version.
    </script>
<script>(false||document.write("<script src=\"JavaScriptEncode[[/site.js?v=jx1PJjLX32-xgQQx2BxnckU9QH9DVKkm4-M5bSK869I]]\"><\/script>"));</script>

    <script src="HtmlEncode[[/site.js?v=jx1PJjLX32-xgQQx2BxnckU9QH9DVKkm4-M5bSK869I]]">
        // Regular script with comment in body, and file version.
    </script>

    <!-- Globbed script tag with existing files and version -->
    <script src="HtmlEncode[[/site.js?v=jx1PJjLX32-xgQQx2BxnckU9QH9DVKkm4-M5bSK869I]]"></script><script src="HtmlEncode[[/sub/site2.js?v=pwJaxaQxnb-rPAdF2JlAp4xiPNq1XuJFd6TyOOfNF-0]]"></script><script src="HtmlEncode[[/sub/site3.js?v=lmeAMiqm76lnGyqHhu6PIBHAC0Vt46mgVB_KaG_gGdA]]"></script>

    <!-- Globbed script tag with existing file, exclude and version -->
    <script src="HtmlEncode[[/site.js?v=jx1PJjLX32-xgQQx2BxnckU9QH9DVKkm4-M5bSK869I]]"></script><script src="HtmlEncode[[/sub/site2.js?v=pwJaxaQxnb-rPAdF2JlAp4xiPNq1XuJFd6TyOOfNF-0]]"></script>
</body>
</html>